<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title></title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <% include("../inc/input_css.html"){}%>
    <style type="text/css">
        .btn-use {
            color: #fff;
            background-color: #a90329;
            padding: 6px 12px;
        }
        .btn-danger{
            color: #fff;
            background-color: #1ab394;
            padding: 6px 12px;
        }
        .btn {
            display: inline-block;
            border: 1px solid transparent;
            font-size: 13px;
            line-height: 1.42857143;
            user-select: none;
        }
    </style>

</head>

<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">商户管理</span>
            <span class="line">/</span>
            模板管理
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="padding-40">
                    <div class="parent middle">
                        <div class="pc">
                            <h3 style="color: #478fca">pc模板选择:</h3>
                            <hr/>
                            <%for(pctemplate in templates){%>
                            <% if(pctemplate.type=='pc'){%>
                            <div style="display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;">
                                <table style="width: 220px;">
                                    <tr>
                                        <td style="padding:5px;"><strong>${pctemplate.name}</strong></td>
                                    </tr>
                                    <tr>
                                        <td style="padding:5px;"><img src="${pctemplate.pic}" width="120" height="180" border="0" style="cursor:pointer; float:left; margin:0 2px;display:block;" id="default" /></td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding:5px;">
                                            <%if(btupc !="" && pctemplate.id==btupc.b_template_id){%>

                                            <a class="btn btn-use">使用中</a>

                                            <%}else{%>
                                            <a  href="selectTemplate?template_id=${pctemplate.id}&template_type=${pctemplate.type}" class="btn btn-danger">应用</a>
                                            <%}%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding:5px;"></td>
                                    </tr>
                                </table>
                            </div>
                            <%}%>
                            <%}%>

                        </div>
                        <div class="wap">
                            <h3 style="color: #478fca">wap模板选择:</h3>
                            <hr/>
                            <% for(waptemplate in templates){%>
                            <%if(waptemplate.type=='wap' && waptemplate.show == 'yes'){%>
                            <div style="display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;">
                                <table style="width: 220px;">
                                    <tr>
                                        <td style="padding:5px;"><strong>${waptemplate.name}</strong></td>
                                    </tr>
                                    <tr>
                                        <td style="padding:5px;"><img src="${waptemplate.pic}" width="120" height="180" border="0" style="cursor:pointer; float:left; margin:0 2px;display:block;" id="default" /></td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding:5px;">
                                            <%if(btuwap !="" && waptemplate.id==btuwap.b_template_id){%>
                                            <a class="btn btn-use">使用中</a>
                                            <%}else{%>
                                            <a  href="selectTemplate?template_id=${waptemplate.id}&template_type=${waptemplate.type}" class="btn btn-danger">应用</a>
                                            <%}%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding:5px;"></td>
                                    </tr>
                                </table>
                            </div>
                            <%}%>
                            <%}%>

                        </div>

                        <br/>

                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<% include("../inc/input_js.html"){}%>

</body>
</html>